package com.zdp.degisn.pipe_filter.filter.impl;

import com.zdp.degisn.pipe_filter.entity.SickNoteContext;
import com.zdp.degisn.pipe_filter.filter.Filter;
import com.zdp.degisn.pipe_filter.service.TeacherService;

/**
 * @author zhengdp
 * @Description
 * @Date 2022/8/28 18:25
 * @Created by zhengdp
 */
public class TeacherFilter implements Filter<SickNoteContext> {

    private TeacherService teacherService;

    @Override
    public void doHandle(SickNoteContext context) {
        System.out.println("教师前置处理");
        //teacherService.handleSickNode(context);
        context.getSickNote().setApproverName("教师1");
        // 允许申请
        context.getSickNote().setStatus(true);
    }

    @Override
    public void afterHandle(SickNoteContext context) {
        System.out.println("教师后置处理");
    }

    @Override
    public String getFilterName() {
        return "TeacherFilter";
    }

    @Override
    public int getOrder() {
        return 1;
    }
}
